const app = {
	state: {
		// 全局变量接口
		app: {
			logo:'https://qstamper.com/images/yx_login.png',
			name:'云玺科技',//名称
			QRCode:'http://yx.qstamper.com/images/8CM.jpg',//二维码
			customerTelephone:'400-004-0551',//客服电话
			fingerPrint:uni.getStorageSync('fingerPrint')||false ,//是否开启指纹认证
			noPasswordPrint:uni.getStorageSync('noPasswordPrint')||false ,//是否开启无密码认证
			supportMode:[],//手机支持的生物认证
			platform:uni.getSystemInfoSync().platform//当前系统ios、android、mac（3.1.10+）、windows（3.1.10+）、linux（3.1.10+）
		},
		qrcode:{
			id:"qrcode",
			bgColor:"#FFFFFF",
			border:{
				color:["#ec008c","#fc6767"],
				lineWidth:6
			},
			code:'',
			color:["#000","#000"],
			level:4,
			size:640,
		}
	},
	mutations: {
		SET_BREADCRUMB: (state, breadcrumb) => {
			state.breadcrumb = breadcrumb
		},
		SET_fingerPrint(state, fingerPrint){
			state.app.fingerPrint = fingerPrint
		},
		SET_noPasswordPrint(state, noPasswordPrint){
			state.app.noPasswordPrint = noPasswordPrint
		},
		SET_supportMode(state, supportMode){
			state.app.supportMode = supportMode
		}
	},
	actions: {
		SET_NOPASSWORDPRINT({commit},noPasswordPrint){
			uni.setStorageSync('noPasswordPrint',noPasswordPrint)
			commit('SET_noPasswordPrint',noPasswordPrint)
		},
		SET_FINGERPRINT({commit},fingerPrint){
			uni.setStorageSync('fingerPrint',fingerPrint)
			commit('SET_fingerPrint',fingerPrint)
		},
		SET_SUPPORTMODE({commit},supportMode){
			commit('SET_supportMode',supportMode)
		},
		SET_BREADCRUMB({
			commit
		}, userInfo) {
			return new Promise((resolve, reject) => {
				commit('SET_BREADCRUMB')
				resolve()
			})
		}
	}
}

export default app
